<!DOCTYPE html>
<title>Upload File</title>
<h1>看图片说话</h1>
<form method="POST" enctype="multipart/form-data">
     {{ form.hidden_tag() }}
     {{ form.photo }}
     {% for error in form.photo.errors %}
         <span style="color: red;">{{ error }}</span>
     {% endfor %}
     {{ form.submit_upload }}
</form>

{% if file_url %}
{% for line in caption %}
  <p><b>{{line}}</b></p>
{% endfor %}
<br><img src="{{ file_url }}">
{% endif %}

